package com.iplant.aps.service.po.aps;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.basic.service.po.bpm.BPMTaskBase;

import java.util.ArrayList;
import java.util.List;

/**
 * 排程版本（审批版）
 *
 * @author PengYouWang
 * 2023-8-16 09:15:04
 */
@DBBasePO(TableName = "aps_scheduling_version_bpm", CheckName = {"Code"}, Name = false, CodeAuto = true,
        CodePrefix = "APS-{yyyyMMdd}-", CodeNum = 4, Schemas = DBSchemas.APS)
public class APSSchedulingVersionBPM extends BPMTaskBase {
    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 排程性质
     */
    @DBCondition
    @DBField
    public int APSShiftPeriod = 0;
    /**
     * 任务ID集合
     */
    @DBField
    public List<Integer> TaskPartIDList = new ArrayList<Integer>();

    /**
     * 辅助属性
     */
    public List<APSTaskPart> TaskPartList = new ArrayList<>();

    public APSSchedulingVersionBPM() {
    }

    @JsonProperty("TaskPartList")
    public List<APSTaskPart> getTaskPartList() {
        return TaskPartList;
    }

    public void setTaskPartList(List<APSTaskPart> taskPartList) {
        TaskPartList = taskPartList;
    }

    @JsonProperty("APSShiftPeriod")
    public int getAPSShiftPeriod() {
        return APSShiftPeriod;
    }

    public void setAPSShiftPeriod(int APSShiftPeriod) {
        this.APSShiftPeriod = APSShiftPeriod;
    }

    @JsonProperty("TaskPartIDList")
    public List<Integer> getTaskPartIDList() {
        return TaskPartIDList;
    }

    public void setTaskPartIDList(List<Integer> taskPartIDList) {
        TaskPartIDList = taskPartIDList;
    }
}
